home *** CD-ROM | disk | FTP | other *** search
/ Enter 2001 April / EnterCD4.iso / Update / SQL Server SP3 / sql70sp3i.exe / X86 / BINN / res / 1033 / sqlmmc.rll / HTML / VBREPMAP.BAS < prev    next >
Encoding:
BASIC Source File  |  1999-04-12  |  3.9 KB  |  92 lines

  1.  
  2. sub OnLoadSrcTgtMaps(strGuid, strType)
  3.   if ((errorFlag and 3) <> 0) then
  4.      exit sub
  5.   end if
  6.   Call GenerateSrcTgtMapsTable(strGuid, strType)
  7.   if (GetLastHistoryText() = "") then
  8.     SrcTgtMapsAnotText.innerText = ""
  9.   else
  10.     SrcTgtMapsAnotText.innerHTML = GetResString(77) & "<a class=""TableRowButton"" href language=""jscript"" onclick=""PopHistory()"">" & GetLastHistoryText() & "</a>"
  11.   end if
  12. end sub
  13.  
  14.  
  15.  
  16.  
  17. ' **********************************************************
  18. '  GenerateSrcTgtMapsTable
  19. '
  20. '  Generates a chart showing the amount of data and index
  21. '  space used.
  22. ' **********************************************************
  23. sub GenerateSrcTgtMapsTable(ByVal strGuid, ByVal strType)
  24.     Dim iNum
  25.     Dim iMax
  26.     Dim arrSources()
  27.     Dim arrTargets()
  28.     Dim strName
  29.     Dim strDesc
  30.  
  31.     strHTML = "<table frame=""void"" class=""DBTable"" width=""100%"" cellpadding=""0"" cellspacing=""2"">"
  32.     Call findSrcTgtGuidsSrc(arrSources, strGuid, strType, iMax)
  33.     iMax = iMax - 1
  34.     For iNum = 0 to iMax
  35.         If (arrSources(iNum, 1) = "table") then
  36.             Call getTableNameDesc(strName, strDesc, arrSources(iNum, 0))
  37.         else
  38.             Call getColumnNameDesc(strName, strDesc, arrSources(iNum, 0))
  39.         End if
  40.         strHTML = strHTML & GenerateSrcTgtRow(strName, strDesc, arrSources(iNum, 0), arrSources(iNum, 1))
  41.     Next
  42.     strHTML = strHTML & "</table>"
  43.     document.all.SrcTgtMapsDataSrc.innerHTML = strHTML
  44.  
  45.     strHTML = "<table frame=""void"" class=""DBTable"" width=""100%"" cellpadding=""0"" cellspacing=""2"">"
  46.     Call findSrcTgtGuidsTgt(arrTargets, strGuid, strType, iMax)
  47.     iMax = iMax - 1
  48.     For iNum = 0 to iMax
  49.         If (arrTargets(iNum, 1) = "table") then
  50.             Call getTableNameDesc(strName, strDesc, arrTargets(iNum, 0))
  51.         else
  52.             Call getColumnNameDesc(strName, strDesc, arrTargets(iNum, 0))
  53.         End if
  54.         strHTML = strHTML & GenerateSrcTgtRow(strName, strDesc, arrTargets(iNum, 0), arrTargets(iNum, 1))
  55.     Next
  56.     strHTML = strHTML & "</table>"
  57.     document.all.SrcTgtMapsDataTgt.innerHTML = strHTML
  58. end sub
  59.  
  60.  
  61. Function GenerateSrcTgtRow(strName, strDesc, strGuid, strType)
  62.     Dim strHTML
  63.     Dim L_packageStr
  64.     strName = MyHTMLEncode(strName)
  65.     strDesc = MyHTMLEncode(strDesc)
  66.  
  67.     L_packageStr = GetResString(32)
  68.     strHTML = ""
  69.     strHTML = strHTML & "<tr>"
  70.     strHTML = strHTML & "  <td width=""50%"" valign=""top"">"
  71.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  72.     strHTML = strHTML & "    <tr>"
  73.     If (strType = "table") then
  74.         strHTML = strHTML & "      <td class=""DBTableText"" width=""24"" nowrap><img src=""reptbl.gif""></td>"
  75.         strHTML = strHTML & "      <td class=""DBTableText"" valign=""center""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowTableProp("" & strName & "","" & strGuid & "")"">" & strName & "</a></td>"
  76.     else
  77.         strHTML = strHTML & "      <td class=""DBTableText"" width=""24"" nowrap><img src=""repcol.gif""></td>"
  78.         strHTML = strHTML & "      <td class=""DBTableText"" valign=""center""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowColumnProp("" & strName & "","" & strGuid & "")"">" & strName & "</a></td>"
  79.     End if
  80.     strHTML = strHTML & "    </tr>"
  81.     strHTML = strHTML & "    </table>"
  82.     strHTML = strHTML & "  </td>"
  83.     strHTML = strHTML & "  <td>"
  84.     strHTML = strHTML & "    <table frame=""void"" cellspacing=""0"" cellpadding=""0"" width=""100%"">"
  85.     strHTML = strHTML & "      <td class=""DBTableText"" align=""left"" valign=""top"">" & strDesc & "</td>"
  86.     strHTML = strHTML & "      <td class=""DBTableText"" valign=""top"" align=""right""><a class=""TableRowButton"" href language=""jscript"" onclick=""ShowSrcTgtPackageProp("" & strName & " " & L_packageStr & "","" & strGuid & "","" & strType & "")"">" & L_packageStr & "</a></td>"
  87.     strHTML = strHTML & "    </table>"
  88.     strHTML = strHTML & "  </td>"
  89.     strHTML = strHTML & "</tr>"
  90.     GenerateSrcTgtRow = strHTML
  91. End Function
  92.